﻿using System;
using System.Collections.Generic;
//using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;

namespace SilverlightApplication1
{
  public partial class Control1 : XapExplorerApplicationBase
  {



    

    public Control1()
    {
      
      InitializeComponent();
      //Image i = new Image();
      //i.Source = new Uri("asdasd");

      //ServiceReference1.Service1Client c = new ServiceReference1.Service1Client();

      this.Storyboard1.Begin();

    }





    private void control1_GotFocus(object sender, RoutedEventArgs e)
    {

      if (isCommInitialized)
        this.tblk.Text = (string)environment["testVal"];

    }



    private void button1_Click(object sender, RoutedEventArgs e)
    {

      if (isCommInitialized)
      {

        Jprl jprl = new Jprl()
        {
          TypJprl = TypJprlEnum.psk,
          LhcKod = 111000,
          Odd = 800,
          OddId = 0,
          Dil = "A",
          Por = "a",
          Maj = 3,
          Katuze = -999999,
          PskBzlJpOp = "1a"
        };


        commands.Add(
          new Command()
          {
            CommandType = CommandTypeEnum.ZmenaLhc,
            TargetApplicationName = "Aplikace obdelnicek",
            CommandParameter = jprl.ToJson()
          }.ToJson()
        );
      }

    }





  }

}
